const { promisify } = require('util')//promise对象
const ora = require('ora')//loading效果
const download = promisify(require('download-git-repo'))

module.exports.clone = async (repo, desc) => {
    try {
        const process = ora(`下载${repo}.....`)
        await download(repo, desc, { clone: true })
        process.succeed()
    } catch (error) {
        console.log("=>", error)
    }
}